
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Android 多包名打包应用 · 《前端学习笔记》</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="XiaoChen">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-ancre-navigation/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Android UI美化之 shape的使用及其属性总结.html" />
    
    
    <link rel="prev" href="../" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        <li class="header">前言</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Android</li>
        
        
    
        <li class="chapter active" data-level="2.1" data-path="Android 多包名打包应用.html">
            
                <a href="Android 多包名打包应用.html">
            
                    
                    Android 多包名打包应用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="Android UI美化之 shape的使用及其属性总结.html">
            
                <a href="Android UI美化之 shape的使用及其属性总结.html">
            
                    
                    Android UI美化之 shape的使用及其属性总结
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">ReactNative</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../ReactNative/CodePush 热更新配置及使用.html">
            
                <a href="../ReactNative/CodePush 热更新配置及使用.html">
            
                    
                    CodePush 热更新配置及使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../ReactNative/已有Android工程 集成React Native.html">
            
                <a href="../ReactNative/已有Android工程 集成React Native.html">
            
                    
                    已有Android工程 集成React Native
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Egret</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../Egret/Egret 白鹭引擎参考资料.html">
            
                <a href="../Egret/Egret 白鹭引擎参考资料.html">
            
                    
                    Egret 白鹭引擎参考资料
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="../Egret/EGER PRO.html">
            
                <a href="../Egret/EGER PRO.html">
            
                    
                    EGER PRO
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="../Egret/Egret 寻路.html">
            
                <a href="../Egret/Egret 寻路.html">
            
                    
                    Egret 寻路
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">工具</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../Tools/homebrew 使用.html">
            
                <a href="../Tools/homebrew 使用.html">
            
                    
                    homebrew 使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../Tools/git 使用.html">
            
                <a href="../Tools/git 使用.html">
            
                    
                    git 使用
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">小程序</li>
        
        
    
        <li class="chapter " data-level="6.1" data-path="../MiniApp/Atom 完美支持 WePY 小程序开发.html">
            
                <a href="../MiniApp/Atom 完美支持 WePY 小程序开发.html">
            
                    
                    Atom 完美支持 WePY 小程序开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="../MiniApp/Atom 插件安装慢解决方案.html">
            
                <a href="../MiniApp/Atom 插件安装慢解决方案.html">
            
                    
                    Atom 插件安装慢解决方案
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Vue</li>
        
        
    
        <li class="chapter " data-level="7.1" data-path="../Vue2/Web 前端环境搭建.html">
            
                <a href="../Vue2/Web 前端环境搭建.html">
            
                    
                    Web 前端环境搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="../Vue2/Vue 项目搭建.html">
            
                <a href="../Vue2/Vue 项目搭建.html">
            
                    
                    Vue 项目搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="../Vue2/初识 VueCli 3.html">
            
                <a href="../Vue2/初识 VueCli 3.html">
            
                    
                    初识 VueCli 3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.4" data-path="../Vue2/使用 VueCli 3.html">
            
                <a href="../Vue2/使用 VueCli 3.html">
            
                    
                    使用 VueCli 3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.5" data-path="../Vue2/VueCli 3 项目配置.html">
            
                <a href="../Vue2/VueCli 3 项目配置.html">
            
                    
                    VueCli 3 项目配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.6" data-path="../Vue3/Vue3探索.html">
            
                <a href="../Vue3/Vue3探索.html">
            
                    
                    初识 Vue3
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">微前端</li>
        
        
    
        <li class="chapter " data-level="8.1" data-path="../MicroApp/qiankun/">
            
                <a href="../MicroApp/qiankun/">
            
                    
                    qiankun
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">团队成长</li>
        
        
    
        <li class="chapter " data-level="9.1" data-path="../Team/Web前端开发规范.html">
            
                <a href="../Team/Web前端开发规范.html">
            
                    
                    开发规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.2" data-path="../Team/Web团队建设--npm私库搭建.html">
            
                <a href="../Team/Web团队建设--npm私库搭建.html">
            
                    
                    私库搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="9.3" data-path="../Team/Web团队建设--自定义脚手架.html">
            
                <a href="../Team/Web团队建设--自定义脚手架.html">
            
                    
                    脚手架搭建
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Android 多包名打包应用</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-anchor"></i><ul><li><span class="title-icon "></span><a href="#android-&#x591A;&#x5305;&#x540D;&#x6253;&#x5305;&#x5E94;&#x7528;"><b></b>Android &#x591A;&#x5305;&#x540D;&#x6253;&#x5305;&#x5E94;&#x7528;</a></li></ul></div><a href="#android-&#x591A;&#x5305;&#x540D;&#x6253;&#x5305;&#x5E94;&#x7528;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="android-&#x591A;&#x5305;&#x540D;&#x6253;&#x5305;&#x5E94;&#x7528;"><a name="android-&#x591A;&#x5305;&#x540D;&#x6253;&#x5305;&#x5E94;&#x7528;" class="anchor-navigation-ex-anchor" href="#android-&#x591A;&#x5305;&#x540D;&#x6253;&#x5305;&#x5E94;&#x7528;"><i class="fa fa-link" aria-hidden="true"></i></a>Android &#x591A;&#x5305;&#x540D;&#x6253;&#x5305;&#x5E94;&#x7528;</h1>
<p>&#x7B80;&#x4ECB;&#xFF1A;
&#x516C;&#x53F8;&#x7684;&#x65B0;&#x9700;&#x6C42;&#xFF1A;&#x540C;&#x4E00;&#x4EFD;&#x4EE3;&#x7801;&#x6253;&#x51FA;&#x53E6;&#x4E00;&#x4E2A;&#x5305;&#x540D;&#x7684;apk&#xFF0C;&#x5373;&#x5305;&#x540D;&#x4E0D;&#x540C;&#x3001;&#x540D;&#x79F0;&#x4E0D;&#x540C;&#x7684;&#x4E24;&#x4E2A;apk&#x3002;</p>
<p>&#x6211;&#x7ECF;&#x8FC7;&#x591A;&#x65B9;&#x6E20;&#x9053;&#x53D1;&#x73B0;&#x5927;&#x81F4;&#x6709;&#x4E00;&#x4E0B;&#x4E09;&#x79CD;&#x65B9;&#x6CD5;&#xFF1A;</p>
<ul>
<li><strong>&#x901A;&#x8FC7;ant&#x6253;&#x591A;&#x5305;&#x540D;&#x5E94;&#x7528;</strong></li>
<li><strong>&#x5EFA;&#x7ACB;&#x591A;&#x4E2A;&#x4E0E;&#x201C;main&#x201D;&#x540C;&#x7EA7;&#x7684;&#x6587;&#x4EF6;&#x5939;&#xFF0C;&#x4FEE;&#x6539;&#x6E05;&#x5355;&#x6587;&#x4EF6;&#x53CA;build.gradle&#x4EE5;&#x8FBE;&#x5230;&#x6253;&#x591A;&#x5305;&#x540D;&#x6548;&#x679C;</strong></li>
<li><strong>&#x901A;&#x8FC7;&#x4FEE;&#x6539;build.gradle&#x6587;&#x4EF6;&#x7684;applicationId&#x8FBE;&#x5230;&#x6253;&#x591A;&#x5305;&#x540D;&#x7684;&#x6548;&#x679C;&#xFF0C;&#x539F;&#x7406;&#x4E0E;&#x7B2C;&#x4E8C;&#x79CD;&#x65B9;&#x6CD5;&#x4F46;&#x6BD4;&#x8F83;&#x7B80;&#x5355;</strong></li>
</ul>
<p>&#x56E0;&#x4E3A;&#x662F;&#x65B0;&#x624B;&#xFF0C;&#x5BF9;ant&#x5E76;&#x4E0D;&#x592A;&#x4E86;&#x89E3;&#xFF0C;&#x539F;&#x7406;&#x4E5F;&#x4E0D;&#x592A;&#x6E05;&#x695A;&#xFF0C;&#x4E3A;&#x4E86;&#x8D76;&#x65F6;&#x95F4;&#x6240;&#x4EE5;&#x76F4;&#x63A5;&#x9009;&#x62E9;&#x4E86;&#x7B2C;&#x4E8C;&#x79CD;&#x4E0E;&#x7B2C;&#x4E09;&#x79CD;&#x65B9;&#x6CD5;&#xFF0C;&#x7ECF;&#x8FC7;&#x6D4B;&#x8BD5;&#x53D1;&#x73B0;&#x7B2C;&#x4E09;&#x79CD;&#x65B9;&#x6CD5;&#x8981;&#x66F4;&#x52A0;&#x7B80;&#x5355;&#x7684;&#x591A;&#xFF0C;&#x6240;&#x4EE5;&#x6700;&#x540E;&#x76F4;&#x63A5;&#x4F7F;&#x7528;&#x4E86;&#x7B2C;&#x4E09;&#x79CD;&#x65B9;&#x6CD5;&#xFF0C;&#x4EE5;&#x4E0B;&#x4E3A;&#x8BE6;&#x89E3;&#x3002;</p>
<hr>
<p>&#x56E0;&#x4E3A;&#x8981;&#x4FEE;&#x6539;&#x7684;&#x662F;build.gradle&#x6587;&#x4EF6;&#x800C;&#x8BE5;&#x6587;&#x4EF6;&#x4E00;&#x7ECF;&#x4FEE;&#x6539;&#x5C31;&#x8981;&#x91CD;&#x65B0;&#x7F16;&#x8BD1;&#xFF0C;&#x7528;&#x8FC7;&#x53F2;&#x4E22;&#x4E22;&#x7684;&#x7AE5;&#x978B;&#x5E94;&#x8BE5;&#x90FD;&#x6E05;&#x695A;&#x7B49;&#x5F85;&#x7F16;&#x8BD1;&#x5B8C;&#x6210;&#x662F;&#x662F;&#x4EF6;&#x591A;&#x4E48;&#x86CB;&#x75BC;&#x7684;&#x4E8B;&#x60C5;&#x6240;&#x4EE5;&#x5EFA;&#x8BAE;&#x5927;&#x5BB6;&#x4E00;&#x6B21;&#x6027;&#x4FEE;&#x6539;&#x5B8C;&#x6210;&#x4EE5;&#x4FBF;&#x8282;&#x7EA6;&#x5F00;&#x53D1;&#x65F6;&#x95F4;&#x3002;</p>
<p>&#x4E0A;&#x9762;&#x5DF2;&#x7ECF;&#x8BF4;&#x8FC7;&#x8BE5;&#x65B9;&#x6CD5;&#x4E3B;&#x8981;&#x662F;&#x901A;&#x8FC7;&#x4FEE;&#x6539;build.gradle&#x6587;&#x4EF6;&#x7684;applicationId&#x8FBE;&#x5230;&#x6253;&#x591A;&#x5305;&#x540D;&#x7684;&#x6548;&#x679C;&#x7684;&#xFF0C;&#x4E0B;&#x9762;&#x4FBF;&#x7C98;&#x51FA;&#x672C;&#x4EBA;&#x4EE3;&#x7801;&#x4F9B;&#x5927;&#x5BB6;&#x53C2;&#x8003;&#x3002;</p>
<pre><code>productFlavors {
    app_one {
        applicationId &quot;com.example.app1&quot;
        manifestPlaceholders = [
        app_name:&quot;&#x6D4B;&#x8BD5;-1&quot;
        ]
    }
    app_two {
        applicationId &quot;com.example.app2&quot;
        manifestPlaceholders = [
        app_name:&quot;&#x6D4B;&#x8BD5;-2&quot;
        ]
    }
    app_three {
        applicationId &quot;com.example.app3&quot;
        manifestPlaceholders = [
        app_name:&quot;&#x6D4B;&#x8BD5;-3&quot;
        ]
    }
}
</code></pre><p>&#x662F;&#x4E0D;&#x662F;&#x611F;&#x89C9;&#x8FD9;&#x4E2A;&#x65B9;&#x6CD5;&#x5F88;&#x773C;&#x719F;&#xFF1F;
&#x6CA1;&#x9519;&#x5C31;&#x662F;&#x591A;&#x6E20;&#x9053;&#x6253;&#x5305;&#x7684;&#x5730;&#x65B9;&#xFF0C;&#x901A;&#x8FC7;&#x6DFB;&#x52A0;&#x8FD9;&#x6BB5;&#x4EE3;&#x7801;&#x540E;&#x9700;&#x8981;&#x7528;&#x5230;gradle&#x9762;&#x677F;&#x8FDB;&#x884C;&#x6253;&#x5305;&#xFF0C;&#x5F97;&#x5230;app_one
&#x901A;&#x8FC7;&#x67E5;&#x770B;&#x5305;&#x540D;&#x53D1;&#x73B0;&#x5B83;&#x7684;&#x5305;&#x540D;&#x4E3A; <code>com.example.app1</code> &#x663E;&#x793A;&#x7684;&#x540D;&#x79F0;&#x4E5F;&#x4E3A; <code>&#x6D4B;&#x8BD5;-1</code>&#xFF0C;app_two &#x4E0E; app_three
&#x6548;&#x679C;&#x7B49;&#x540C;&#xFF0C;&#x81F3;&#x6B64;&#x5DF2;&#x7ECF;&#x5B8C;&#x6210;&#x591A;&#x5305;&#x540D;&#x6253;&#x5305;&#xFF0C;&#x4E14;&#x901A;&#x8FC7;&#x540C;&#x4E00;&#x4EFD;&#x4EE3;&#x7801;&#x6253;&#x51FA;&#x4E86;&#x4E0D;&#x540C;&#x5305;&#x540D;&#x3001;&#x4E0D;&#x540C;&#x540D;&#x79F0;&#x7684;&#x4E09;&#x4E2A;&#x5E94;&#x7528;&#xFF0C;&#x800C;&#x9700;&#x6C42;&#x4E5F;&#x8FBE;&#x5230;&#x4E86;&#x3002;</p>
<p>&#x53EF;&#x80FD;&#x6709;&#x7684;&#x670B;&#x53CB;&#x4F1A;&#x95EE;&#x5982;&#x679C;&#x8FD8;&#x9700;&#x8981;&#x5176;&#x4ED6;&#x7684;&#x6E20;&#x9053;&#x5305;&#x600E;&#x4E48;&#x529E;&#xFF0C;&#x5982;&#x679C;&#x6709;10&#x7684;&#x6E20;&#x9053;&#x800C;&#x53C8;&#x8981;&#x6253;&#x5305;&#x4E24;&#x4E2A;&#x4E0D;&#x540C;&#x7684;&#x5E94;&#x7528;&#x90A3;&#x5C82;&#x4E0D;&#x662F;&#x8981;&#x5199;20&#x4E2A;&#x7C7B;&#x4F3C;&#x4E8E;app_one&#x7684;&#x4E1C;&#x897F;&#xFF0C;&#x90A3;&#x4E0D;&#x662F;&#x8981;&#x5F88;&#x9EBB;&#x70E6;&#xFF1F;&#x6CA1;&#x9519;&#x6211;&#x6B63;&#x597D;&#x4E5F;&#x78B0;&#x5230;&#x4E86;&#x8FD9;&#x79CD;&#x60C5;&#x51B5;&#xFF0C;&#x7ECF;&#x8FC7;&#x591A;&#x6B21;&#x7814;&#x7A76;&#x6D4B;&#x8BD5;&#x53D1;&#x73B0;&#x5E76;&#x6CA1;&#x6709;&#x90A3;&#x4E48;&#x9EBB;&#x70E6;&#xFF0C;&#x53EA;&#x9700;&#x8BBE;&#x5B9A;&#x4E00;&#x4E2A;&#x9ED8;&#x8BA4;&#x7684;&#x5305;&#x540D;&#x3001;&#x5E94;&#x7528;&#x540D;&#x5373;&#x53EF;&#xFF0C;&#x5E9F;&#x8BDD;&#x4E0D;&#x591A;&#x8BF4;&#xFF0C;&#x76F4;&#x63A5;&#x8D34;&#x4EE3;&#x7801;&#x3002;</p>
<pre><code>defaultConfig {
    if (PACKAGE == &quot;one&quot;) {
        applicationId &quot;com.example.app1&quot;
        manifestPlaceholders = [
        app_name:&quot;&#x6D4B;&#x8BD5;-1&quot;
        ]
    } else {
        applicationId &quot;com.example.app2&quot;
        manifestPlaceholders = [
        app_name:&quot;&#x6D4B;&#x8BD5;-2&quot;
        ]
    }
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 1
    versionName &quot;1.0&quot;

}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile(&apos;proguard-android.txt&apos;), &apos;proguard-rules.pro&apos;
    }
}

productFlavors {
    app_one {}
    app_two {}
    app_three {}
}
</code></pre><p>&#x55EF;&#xFF0C;&#x5C31;&#x662F;&#x8FD9;&#x6837;&#xFF0C;&#x5728;defaultConfig&#x91CC;&#x9762;&#x8BBE;&#x7F6E;&#x4E00;&#x4E2A;&#x9ED8;&#x8BA4;&#x7684;&#x5305;&#x540D;&#x4E0E;&#x5E94;&#x7528;&#x540D;&#x5C31;&#x53EF;&#x4EE5;&#x4E86;&#x3002;</p>
<p>&#x597D;&#x4E86;&#xFF0C;&#x5230;&#x4E86;&#x8FD9;&#x4E00;&#x6B65;&#x6211;&#x4EEC;&#x5C31;&#x8981;&#x7528;&#x5230;&#x53E6;&#x4E00;&#x4E2A;&#x795E;&#x5947;&#x7684;&#x6587;&#x4EF6;&#x4E86;</p>
<p><img src="http://img.blog.csdn.net/20161020181721926" alt="&#x5DE5;&#x7A0B;&#x76EE;&#x5F55;&#x4E0B;&#x914D;&#x7F6E;&#x6587;&#x4EF6;"></p>
<p>&#x770B;&#x770B;&#x4F60;&#x7684;&#x5DE5;&#x7A0B;&#x6839;&#x76EE;&#x5F55;&#x4E0B;&#x5F97;&#x8FD9;&#x4E2A;&#x4E1C;&#x897F;&#xFF0C;&#x6CA1;&#x9519;&#x5C31;&#x662F;&#x5B83;&#xFF0C;&#x8FD9;&#x91CC;&#x6211;&#x8BBE;&#x7F6E;&#x4E86;&#x4E00;&#x4E2A;&#x5B57;&#x6BB5;&#x201C;PACKAGE&#x201D;&#xFF0C;&#x5373;&#x544A;&#x8BC9;Studio&#x6211;&#x60F3;&#x8981;&#x4EC0;&#x4E48;&#x5305;&#xFF0C;&#x5230;&#x8FD9;&#x91CC;&#x76F8;&#x4FE1;&#x5927;&#x5BB6;&#x4E5F;&#x5C31;&#x660E;&#x767D;&#x6211;&#x5199;&#x7684;&#x5224;&#x65AD;&#x7684;&#x76EE;&#x7684;&#x4E86;&#x3002;</p>
<pre><code>PACKAGE=one
</code></pre><p>&#x53EA;&#x8981;&#x901A;&#x8FC7;&#x4FEE;&#x6539;&#x8FD9;&#x4E00;&#x5B57;&#x6BB5;&#x4E3A;&#x201C;one&#x201D;&#xFF0C;&#x7136;&#x540E;&#x901A;&#x8FC7;&#x6253;&#x5305;&#x540E;&#x5C31;&#x53EF;&#x4EE5;&#x5F97;&#x5230;&#x4E09;&#x4E2A;&#x201C;&#x6D4B;&#x8BD5;-1&#x201D;&#x7684;app_one&#x3001;app_two&#x3001;app_three&#x7684;apk&#x6587;&#x4EF6;&#x4E86;&#xFF0C;&#x540C;&#x7406;&#x5C06;&#x5176;&#x4FEE;&#x6539;&#x4E3A;&#x5176;&#x4ED6;&#x5B57;&#x6BB5;&#x5373;&#x53EF;&#x6253;&#x51FA;&#x5176;&#x4ED6;&#x5305;&#x540D;&#x3001;&#x5E94;&#x7528;&#x540D;&#x7684;&#x5E94;&#x7528;&#x4E86;&#x3002;
&#x4F46;&#x662F;&#x8F6C;&#x5230;&#x672C;&#x4EBA;&#x516C;&#x53F8;&#x9879;&#x76EE;&#x540E;&#x53D1;&#x73B0;&#x8FD9;&#x79CD;&#x65B9;&#x6CD5;&#x7ADF;&#x7136;&#x5931;&#x7075;&#x4E86;&#xFF0C;&#x5373;&#x4FEE;&#x6539; properties &#x6587;&#x4EF6;&#x5185;&#x7684;&#x5B57;&#x6BB5;&#x540E;&#x5F97;&#x4E0D;&#x5230;&#x6211;&#x60F3;&#x8981;&#x7684;&#x5305;&#xFF0C;&#x7ECF;&#x8FC7;&#x63A2;&#x7D22;&#x53D1;&#x73B0;&#x53EF;&#x80FD;&#x662F;&#x4E0E;&#x9879;&#x76EE;&#x5DE5;&#x7A0B;&#x7684;&#x5927;&#x5C0F;&#x6709;&#x5173;&#xFF0C;&#x6539;&#x5B8C;&#x91CD;&#x542F;&#x540E;&#x5C31;&#x53EF;&#x4EE5;&#x4E86;&#x3002;
&#x5F53;&#x7136;&#x8FD8;&#x6709;&#x53E6;&#x4E00;&#x4E2A;&#x6700;&#x91CD;&#x8981;&#x7684;&#x5730;&#x65B9;</p>
<pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
package=&quot;com.example.morepackagenametest&quot;&gt;

&lt;application
android:allowBackup=&quot;true&quot;
android:icon=&quot;@mipmap/ic_launcher&quot;
android:label=&quot;${app_name}&quot;
android:supportsRtl=&quot;true&quot;
android:theme=&quot;@style/AppTheme&quot;&gt;
&lt;activity android:name=&quot;.MainActivity&quot;&gt;
    &lt;intent-filter&gt;
        &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;

        &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
    &lt;/intent-filter&gt;
&lt;/activity&gt;
&lt;/application&gt;

&lt;/manifest&gt;
</code></pre><p>&#x5C31;&#x662F;&#x8FD9;&#x91CC;&#x4E86;&#xFF0C;&#x5373;&#x4E4B;&#x524D;&#x5B9A;&#x4E49;&#x7684;&#x540D;&#x5B57;&#x8D4B;&#x7ED9;&#x5E94;&#x7528;&#x4E86;&#xFF0C;&#x5728;&#x8FD9;&#x91CC;&#x5927;&#x5BB6;&#x8981;&#x6CE8;&#x610F;&#x4E00;&#x4E0B;&#x5728;&#x8BE5;&#x9879;&#x76EE;&#x7684;&#x5176;&#x4ED6; model &#x5185;&#x7684;&#x6E05;&#x5355;&#x6587;&#x4EF6;&#x91CC;&#x6700;&#x597D;&#x4E0D;&#x8981;&#x5199;  <code>android&#xFF1A;label</code>
&#x8FD9;&#x53E5;&#x4E86;&#xFF0C;&#x5426;&#x5219;&#x4F1A;&#x62A5;&#x9519;&#x7684;&#xFF0C;&#x81F3;&#x4E8E;&#x662F;&#x4EC0;&#x4E48;&#x9519;&#x4E00;&#x773C;&#x5C31;&#x53EF;&#x4EE5;&#x770B;&#x5230;&#x4E86;&#xFF0C;&#x5F53;&#x7136;&#x5982;&#x679C;&#x62A5;&#x9519;&#x4E86;&#x6709;&#x4E24;&#x4E2A;&#x65B9;&#x6CD5;&#xFF1A;</p>
<ol>
<li>&#x5220;&#x6389;&#x5176;&#x4ED6; model &#x5185;&#x6E05;&#x5355;&#x6587;&#x4EF6;&#x4E0B;<code>application</code>&#x7684; <code>label</code> &#x5C5E;&#x6027;</li>
<li>&#x901A;&#x8FC7;&#x5728; <code>application</code> &#x4E0B;&#x6DFB;&#x52A0; <code>tools:replace=&quot;android:label&quot;</code> &#x5C5E;&#x6027;&#x89E3;&#x51B3;</li>
</ol>
<p>&#x597D;&#x4E86;&#xFF0C;&#x6253;&#x5B8C;&#x6536;&#x5DE5;&#x3002;&#x671F;&#x5F85;&#x5927;&#x795E;&#x7684;&#x6279;&#x8BC4;&#x6307;&#x5BFC;&#x3002;</p>
<p>&#x6700;&#x540E;&#x9644;&#x4E0A;&#x8D44;&#x6E90;&#x4E0B;&#x8F7D;&#x5730;&#x5740;  <a href="http://download.csdn.net/detail/qq_33673284/9659262" target="_blank">Android &#x591A;&#x5305;&#x540D;&#x6253;&#x5305;&#x5E94;&#x7528;</a>  &#x4F9B;&#x5404;&#x4F4D;&#x53C2;&#x8003;</p>
<footer class="page-footer"><span class="copyright">Copyright &amp; copy zengqing.top 2023 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x66F4;&#x65B0;&#x4E8E;&#xFF1A;
2023-03-25 20:59:14
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../" class="navigation navigation-prev " aria-label="Previous page: 简介">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Android UI美化之 shape的使用及其属性总结.html" class="navigation navigation-next " aria-label="Next page: Android UI美化之 shape的使用及其属性总结">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Android 多包名打包应用","level":"2.1","depth":1,"next":{"title":"Android UI美化之 shape的使用及其属性总结","level":"2.2","depth":1,"path":"Android/Android UI美化之 shape的使用及其属性总结.md","ref":"./Android/Android UI美化之 shape的使用及其属性总结.md","articles":[]},"previous":{"title":"简介","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["expandable-chapters","code","pageview-count","chapter-fold","expandable-chapters-small","tbfed-pagefooter","hide-element","ancre-navigation"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright & copy zengqing.top 2023","modify_label":"该文件更新于：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"pageview-count":{},"ancre-navigation":{"showLevel":true,"associatedWithSummary":true,"mode":"float","printLog":false,"multipleH1":true,"float":{"showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""},"pageTop":{"showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""}},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"theme":"default","author":"XiaoChen","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"《前端学习笔记》","language":"zh-hans","gitbook":"*","description":"个人学习笔记，记录学习过程中的点点滴滴"},"file":{"path":"Android/Android 多包名打包应用.md","mtime":"2023-03-25T12:59:14.014Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-03-26T04:06:26.355Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

